//封装获取浏览器滚动的距离
		function getScrollOffset(){
			console.log("rrrr");
			if(window.pageXOffset){
				return {
					x:window.pageXOffset,
					y:window.pageYOffset
				}
			}else{
				return{
					x:document.body.scrollLeft + 
						document.documentElement.scrollLeft,
					y:document.body.scrollTop +
						document.documentElement.scrollTop
				}
			}
		}


		//阅读器
	var start = document.getElementsByTagName("div")[0];
	var stop = document.getElementsByTagName("div")[1];

	var timer = 0;
	var key = true;
	console.log(start);
	start.onclick = function(){
		if(key){
			timer = setInterval(function(){
				window.scrollBy(0,2);
			},100); 
			key = false;
		}
		
	}

	stop.onclick = function(){
		clearInterval(timer);
		key = true;
	}


	//封装兼容的 返回浏览器视口
	function getViewportOffset(){
		if(window.innerWidth){
			return{
				w:window.innerWidth,
				h:window.innerHeight
			}
		}else{
			if(document.compatMode == "BackCompat"){
				return{
					w:document.body.clientWidth,
					h:document.body.clientHeight
				}
			}else{
				return{
					w:document.documentElement.clientWidth,
					h:document.documentElement.clientHeight

				}
			}

		}
	}

	//封装方法 获取元素属性
		function getStyle(ele,prop){
			if(window.getComputedStyle){
				return window.getComputedStyle(ele,null)[prop];
			}else{
				return ele.currentStyle[prop];
			}
		}


	//封装兼容的方法，给元素绑定事件
	function addEvent(elem,type,handle){
		if(elem.addEventListener){
			elem.addEventListener(type, handle, false);
		}else if(elem.attachEvent){
			elem.attachEvent('on'+ type, function(){
				handle.call(elem);
			})
		}else{
			elem['on'+type] = handle;
		}

	}

	//获取对象属性值
	function getStyle(obj,attr){
		if(obj &&　ibj.getComputedStyle){

		}
	}